@use './styles/typography';
@use './styles/spacing';
@use './styles/colors';
@use './styles/buttons';
:root {
  @include typography.typeSystem;
  @include spacing.spacingSystem;
  @include colors.colorSystem;

  overflow-y: overlay;
  /* Effects */
  --blur-light: 4px;
  --blur-strong: 16px;
}

// Example breakpoint
// @media screen and (max-width: 800px) {
//   :root {
//     font-size: 16px;
//     --text-scale-ratio: 1.2;
//   }
// }

// this fixes a problem with an extra horizontal scrollbar when
// a vertical scrollbar is displayed, don't change
html {
  width: 100vw;
  overflow-x: hidden;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  /* Frameless window defaults */
  --titlebar-color: var(--body-background);
  --titlebar-symbol-color: var(--accent);
  --overlay-controls-height: env(titlebar-area-height, 39px);
  --overlay-controls-width: calc(
    100vw - env(titlebar-area-width, calc(100vw - 120px))
  );
  // these 2 !important fix a problem when displaying the
  // context menu in the library, material ui sets values
  // that create problems, don't change
  overflow: auto !important;
  padding: 0 !important;
}

/* Overlay Scrollbar*/
/* width */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background: var(--current-background, var(--body-background));
}

/* Track */
::-webkit-scrollbar-track {
  display: none;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 5px;
  margin: 2px;
  border: 2px solid var(--current-background, var(--body-background));
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-overlay);
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent);
}

::-webkit-scrollbar-corner,
::-webkit-resizer {
  background: var(--gradient-body-background, var(--body-background));
}

.simple-keyboard-wrapper {
  display: none;
  &[open] {
    position: fixed;
    display: initial;
    inset-block-start: auto;
    inset-block-end: 50px;
    width: 100vw;
    background: var(--osk-background);
  }
}

.smallInputInfo {
  font-size: var(--text-sm);
  align-self: flex-start;
  margin-block: var(--space-xs) var(--space-3xs);
  margin-inline: var(--space-xs) 0;
  color: var(--text-secondary);
}
